package c.e.a.c.l;

import android.view.View;
import android.view.View.OnClickListener;
import c.e.a.c.l.d.e;
import com.google.android.material.datepicker.CalendarConstraints;
import com.google.android.material.datepicker.Month;
import java.util.Calendar;

/* compiled from: YearGridAdapter */
public class u implements OnClickListener {
    public final /* synthetic */ int a;
    public final /* synthetic */ v b;

    public u(v vVar, int i) {
        this.b = vVar;
        this.a = i;
    }

    public void onClick(View view) {
        int i = this.a;
        int i2 = this.b.c.b0.c;
        Calendar d = t.d();
        d.set(1, i);
        d.set(2, i2);
        Month month = new Month(d);
        CalendarConstraints calendarConstraints = this.b.c.Z;
        if (month.compareTo(calendarConstraints.a) < 0) {
            month = calendarConstraints.a;
        } else if (month.compareTo(calendarConstraints.b) > 0) {
            month = calendarConstraints.b;
        }
        this.b.c.o0(month);
        this.b.c.p0(e.DAY);
    }
}
